﻿
<!DOCTYPE html>
<html lang="zh-CN" style="background: #fff;">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>陕西省交口抽渭灌溉中心</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="/MobWeb/CSS/login/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="/MobWeb/CSS/login/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="/MobWeb/CSS/login/base.css" />
    <link rel="stylesheet" type="text/css" href="/MobWeb/CSS/login/page.css" />
    <link rel="stylesheet" type="text/css" href="/MobWeb/CSS/login/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="/MobWeb/CSS/login/iconfont.css" />
</head>
<body style="background: #ffffff;">

    <header class="mui-bar mui-bar1 mui-bar-nav mui-bar-nav1" id="header" style="background: transparent;"></header>

    <div class="warp clearfloat" style="margin: 0;">
        <div class="login-top clearfloat box-s">
            <div class="ge-back"><img src="/MobWeb/CSS/login/login.png"></div>
            <div class="logo-imgs">
                <img src="/MobWeb/Images/personhead.png" />
            </div>
        </div>
    </div>
    <div class="tab-account" style="background: #fff;padding: 0;margin-top: 11%;">
        <p class="text-center" style="height: 20PX;FONT-FAMILY: CURSIVE;font-size: 22PX;line-height:20PX;color: #12b8f6;">交口抽渭灌区</p>
        <p class="text-center" style="height: 20PX;FONT-FAMILY: CURSIVE;font-size: 22PX;line-height:20PX;color: #12b8f6;">农业灌溉管理平台</p>

        <ul id="myTab" class="nav nav-tabs login-tabs hidden">
            <li>
                <a href="#xinxi" data-toggle="tab">注册</a>
            </li>
            <li class="active"><a href="#mima" data-toggle="tab">登录</a></li>
        </ul>
        <div id="myTabContent" class="tab-content" style="background: #fff; padding: 0.4rem;">
            <div class="tab-pane fade in " id="xinxi">
                <form role="form">
                    <div class="form-group login-group_re">
                        <i class="iconfont icon-shoujihaoma"></i>
                        <input type="text" class="form-control inpt-form" id="name" placeholder="请输入手机号">
                    </div>
                    <div class="form-group login-group_re">
                        <i class="iconfont icon-yanzhengma2"></i>
                        <input type="tel" class="form-control inpt-form" id="tel" placeholder="请输入手机号验证码">
                        <a href="javascript:;" id="getCode" data-appid="2034800824" data-cbfn="callback" class="linkABlue yanzheng">获取验证码</a>
                    </div>
                    <div class="form-group login-group_re">
                        <i class="iconfont icon-mima"></i>

                        <input data-toggle="password" data-placement="before" data-message="点击显示/隐藏密码" class="form-control inpt-form" type="password" placeholder="请输入密码">
                    </div>
                    <button type="button" class="conf-btn login-btns">注册</button>
                </form>
            </div>
            <div class="tab-pane fade in active" id="mima">
                <form role="form">
                    <div class="form-group login-group_re">
                        <i class="iconfont icon-shoujihaoma"></i>
                        <input type="text" class="form-control inpt-form" id="username" placeholder="请输入登录用户名">
                    </div>
                    <div class="form-group login-group_re">
                        <i class="iconfont icon-mima"></i>

                        <input id="password" data-toggle="password" data-placement="before" data-message="点击显示/隐藏密码" class="form-control inpt-form" type="password" placeholder="请输入密码">
                    </div>
                    <div class="yi-zhang wang-mi login-wang">
                        <div class="form-actions form-ji">
                            <div>
                                <span>
                                    <div style="display: inline-block;margin-left:3px;margin-top:1px;">
                                        <input name="isJZMM" id="isJZMM" type="checkbox" checked="checked" style="padding-top:0px;">
                                        <label style="display:contents;" for="isJZMM">记住密码</label>
                                    </div>
                                    <!--<div style="display: inline-block;margin-top:-3px;margin-right:2px;margin-left: 2px;font-size:14px !important">
                                        <font>记住密码</font>
                                    </div>-->
                                </span>
                            </div>
                        </div>
                        <!--<a href="findWord.html">忘记密码？</a>-->
                    </div>
                    <a>
                        <button type="button" class="conf-btn login-btns uppercase">登录</button>
                    </a>
                </form>
            </div>
        </div>
    </div>
    <script src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js?jsver=20160628" type="text/javascript"></script>
    <script src="/MobWeb/CSS/login/bootstrap-show-password.js"></script>
    <script type="text/javascript">
        $.ajaxSettings.async = false;
        var ComID = "10314";
        var SelTypeId = 0;
        $(function () {


            $(".uppercase").click(function (e) {

                var msg = "";
                if ($.trim($("#username").val()) == "") {

                    msg = "请输入用户名";
                    ComFunJS.winwarning(msg);
                    return;
                }
                if ($.trim($("#password").val()) == "") {

                    msg = "请输入密码";
                    ComFunJS.winwarning(msg);
                    return;
                }
                if ($(this).hasClass("disabled-link")) {
                    return;
                }
                if (!msg) {
                    e.preventDefault();
                    $(".uppercase").text("正在登陆")
                    $.getJSON('/API/WXAPI.ashx?Action=LOGIN', { "chkcode": "APP", "password": $("#password").val(), "UserName": $("#username").val(), "ComID": ComID }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            ComFunJS.setCookie('szhlcode', resultData.Result);
                            ComFunJS.setCookie('username', resultData.Result1, 20000);



                            ComFunJS.setCookie('up', "");
                            ComFunJS.setCookie('UP', "");

                            if ($("#isJZMM").prop("checked")) {
                                ComFunJS.setCookie('password', $("#password").val(), 20000);
                            } else {
                                ComFunJS.setCookie('password', "", 20000);
                            }
                            location.href = "index.html";
                        } else {
                            $(".uppercase").val("登录");

                        }
                    })
                }
                
            });
            if (ComFunJS.getCookie("username") && ComFunJS.getCookie("password")) {
                if (ComFunJS.getCookie("username").length != 18) {
                    $("#username").val(ComFunJS.getCookie("username"));
                    $("#password").val(ComFunJS.getCookie("password"));
                }
            
            }
        });
        function jptj(event) {
            if (event.keyCode == 13 || event.keyCode == 10) {
                $(".uppercase").trigger('click');
            }
        }
        function setCookie(name, value) {

            var Days = 30;
            var exp = new Date();
            exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
            document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";

        }
    </script>

</body>
</html>
